﻿Imports System.IO

Module Main
    Sub main()
        Dim varA As String = vbNullString
        Dim varB As String = vbNullString
        Dim file1 As String = vbNullString
        Dim file2 As String = vbNullString
        Dim asfile1 As Boolean
        Dim asfile2 As Boolean

        If My.Application.CommandLineArgs.Count > 0 Then
            varA = My.Application.CommandLineArgs(0)
            If varA.Substring(0, 2) = "-1" Then
                If File.Exists(varA.Substring(3)) Then
                    file1 = varA.Substring(3)
                    asfile1 = True
                End If
            End If

            varB = My.Application.CommandLineArgs(1)
            If varB.Substring(0, 2) = "-2" Then
                If File.Exists(varB.Substring(3)) Then
                    file2 = varB.Substring(3)
                    asfile2 = True
                End If
            End If



        End If

        If Asfile1 And Asfile2 Then
            Dim frmConfronta As New ConfrontaVBP.ConfrontoVBP
            frmConfronta.TextBox1.Text = file1
            frmConfronta.TextBox2.Text = file2
            frmConfronta.ShowDialog()
        Else
            Dim frmMain As New MainMDI
            frmMain.ShowDialog()

        End If


    End Sub



End Module
